package com.xyz.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
        private boolean flag;   //是否成功
        private Integer status; //状态码
        private String message; //返回信息
        private Object data;    //返回数据
    public static Result success(Object data) {

        return new Result(true,200,null,data);
    }
    public static Result success() {

        return new Result(true,200,null,null);
    }
    public static Result error(String message) {
        return new Result(false,201,message,null);
    }
}
